package com.adhere.system.mapper;

import com.adhere.system.pojo.RbacRole;
import com.adhere.system.pojo.vo.RoleVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 角色表删除执行：逻辑真删除 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2021-04-02
 */
public interface RbacRoleMapper extends BaseMapper<RbacRole> {

    @Select("select a.* from rbac_role a left join rbac_user_role b on a.code = b.role_code where b.user_code = #{userCode}")
    List<RbacRole> getRoleListByUserCode(String userCode);

    RoleVo getRoleDetailByRoleCode(String roleCode);
}
